class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.t: B = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.r: A = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.v: D = None
        self.p: A = None
        self.x: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
l = B("l")
m = C("m")
h = D("h")
g = E("g")
n = F("n")
i = B("i")
j = B("j")
e = A("e")
c = D("c")

b.q = e
b.y = g
b.t = l
b.x = n
l.v = h
l.x = h
l.r = b
l.z = n
m.s = h
m.z = n
h.p = n
h.z = m
h.s = m
h.w = c
g.z = h
g.v = h
g.x = h
g.r = b
g.p = e
g.o = j
n.o = g
n.v = g
i.v = h
i.x = c
i.r = b
i.z = n
j.v = c
j.x = c
j.r = e
j.z = n
e.q = b
e.y = g
e.t = j
e.x = n
c.p = n
c.z = m
c.s = m
c.w = h
assert g.r.t.z.o.o.r.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.t: B = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.r: A = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.v: D = None
        self.p: A = None
        self.x: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
l = B("l")
m = C("m")
h = D("h")
g = E("g")
n = F("n")
i = B("i")
j = B("j")
e = A("e")
c = D("c")

b.q = e
b.y = g
b.t = l
b.x = n
l.v = h
l.x = h
l.r = b
l.z = n
m.s = h
m.z = n
h.p = n
h.z = m
h.s = m
h.w = c
g.z = h
g.v = h
g.x = h
g.r = b
g.p = e
g.o = j
n.o = g
n.v = g
i.v = h
i.x = c
i.r = b
i.z = n
j.v = c
j.x = c
j.r = e
j.z = n
e.q = b
e.y = g
e.t = j
e.x = n
c.p = n
c.z = m
c.s = m
c.w = h
assert g.r.t.z.o.o.r.x.v.txt == "g"