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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.r: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: D = None
        self.v: B = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: G = None
        self.txt = txt

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

h = A("h")
e = B("e")
f = C("f")
k = D("k")
i = E("i")
b = F("b")
g = G("g")
d = B("d")

h.u = g
e.t = d
e.r = d
e.u = h
f.o = b
f.u = b
f.t = b
f.p = g
f.q = h
f.s = e
f.y = i
k.r = b
k.o = b
k.v = f
k.x = h
i.p = g
i.y = g
i.z = k
i.v = d
i.o = f
b.p = k
b.y = g
g.o = h
g.v = k
d.t = e
d.r = e
d.u = h
assert e.u.u.v.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.r: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: D = None
        self.v: B = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: G = None
        self.txt = txt

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

h = A("h")
e = B("e")
f = C("f")
k = D("k")
i = E("i")
b = F("b")
g = G("g")
d = B("d")

h.u = g
e.t = d
e.r = d
e.u = h
f.o = b
f.u = b
f.t = b
f.p = g
f.q = h
f.s = e
f.y = i
k.r = b
k.o = b
k.v = f
k.x = h
i.p = g
i.y = g
i.z = k
i.v = d
i.o = f
b.p = k
b.y = g
g.o = h
g.v = k
d.t = e
d.r = e
d.u = h
assert e.u.u.v.x.u.txt == "g"