class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.u: E = None
        self.r: E = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.s: I = None
        self.x: C = None
        self.q: A = None
        self.z: G = None
        self.o: G = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: I = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: C = None
        self.s: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: B = None
        self.txt = txt

g = A("g")
b = B("b")
f = C("f")
c = D("c")
l = E("l")
d = F("d")
j = G("j")
n = H("n")
m = I("m")
e = G("e")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.u: E = None
        self.r: E = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.s: I = None
        self.x: C = None
        self.q: A = None
        self.z: G = None
        self.o: G = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: I = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: C = None
        self.s: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: B = None
        self.txt = txt

g = A("g")
b = B("b")
f = C("f")
c = D("c")
l = E("l")
d = F("d")
j = G("j")
n = H("n")
m = I("m")
e = G("e")

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