class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.o: G = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

f = A("f")
a = B("a")
k = C("k")
l = D("l")
d = E("d")
g = F("g")
j = G("j")
b = G("b")

f.s = d
f.z = g
f.x = l
f.y = l
a.t = d
a.u = l
a.o = j
a.x = g
k.v = b
k.x = f
l.y = a
d.s = b
d.x = l
g.y = a
j.x = l
j.r = g
j.s = g
j.o = f
b.x = l
b.r = g
b.s = g
b.o = f
assert g.y.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.o: G = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

f = A("f")
a = B("a")
k = C("k")
l = D("l")
d = E("d")
g = F("g")
j = G("j")
b = G("b")

f.s = d
f.z = g
f.x = l
f.y = l
a.t = d
a.u = l
a.o = j
a.x = g
k.v = b
k.x = f
l.y = a
d.s = b
d.x = l
g.y = a
j.x = l
j.r = g
j.s = g
j.o = f
b.x = l
b.r = g
b.s = g
b.o = f
assert g.y.u.y.txt == "a"