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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: A = None
        self.u: G = None
        self.q: F = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.r: E = None
        self.t: D = None
        self.w: C = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.p: F = None
        self.s: B = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: A = None
        self.u: G = None
        self.q: F = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: D = None
        self.r: E = None
        self.t: D = None
        self.w: C = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.p: F = None
        self.s: B = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

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