class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.q: G = None
        self.y: C = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.u: E = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.t: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.u: E = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.t: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.x: E = None
        self.txt = txt

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

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